#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int i = 0;
	int n = 0;
	for (n = 1; n <= 100; n++)
	{
		if (n % 10 == 9)
		{
			i++;
		}
		if (n / 10 == 9)
		{
			i++;
		}
	}
	printf("%d", i);
	return 0;
}